01看球[体].js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. globalThis.getVideos = function (link, key) {
  2. let html = request(link);
  3. let json = JSON.parse(html);
  4. let data = json.data;
  5. data = data[key];
  6. let videos = [];
  7. if (data) {
  8. videos = data.map((n) => {
  9. let id = n.url;
  10. let name = n.league_name_zh + ' ' + n.home_team_zh + ' VS ' + n.away_team_zh;
  11. let pic = n.cover;
  12. let remarks = n.nickname;
  13. return {
  14. vod_id: id,
  15. vod_name: name,
  16. vod_pic: pic,
  17. vod_remarks: remarks,
  18. };
  19. });
  20. }
  21. return videos
  22. }
  23. var rule = {
  24. 类型: '影视',//影视|听书|漫画|小说
  25. title: '01看球[球]',
  26. host: 'https://szyw.dc5e.com/',
  27. homeUrl: '/api/web/h5_index',
  28. url: '/api/web/live_lists/fyclass',
  29. searchUrl: '/api/web/search?keyword=**',
  30. searchable: 2,
  31. quickSearch: 0,
  32. filterable: 0,
  33. headers: {
  34. 'User-Agent': 'MOBILE_UA',
  35. },
  36. timeout: 5000,
  37. class_name: '全部&足球&篮球&综合',
  38. class_url: '1&2&3&99',
  39. play_parse: true,
  40. pagecount: {
  41. "1": 1,
  42. "2": 1,
  43. "3": 1,
  44. "99": 1,
  45. },
  46. lazy: $js.toString(() => {
  47. input = {parse: 0, url: input, header: rule.headers};
  48. }),
  49. 推荐: $js.toString(() => {
  50. VODS = getVideos(input, 'hot_matches');
  51. }),
  52. 一级: $js.toString(() => {
  53. VODS = [];
  54. if (MY_PAGE <= 1) {
  55. VODS = getVideos(input, 'data');
  56. }
  57. }),
  58. 二级: '*',
  59. 搜索: $js.toString(() => {
  60. VODS = [];
  61. if (MY_PAGE <= 1) {
  62. VODS = getVideos(input, 'ball');
  63. }
  64. }),
  65. }